package com.grj.parkingsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 优惠券表
 * @TableName t_coupon
 */
@TableName(value ="t_coupon")
@Data
public class Coupon implements Serializable {
    /**
     * 优惠券ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 优惠券类型(0:满减,1:折扣,2:免费时长)
     */
    @TableField(value = "coupon_type")
    private Integer couponType;

    /**
     * 金额/折扣值
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 最低消费
     */
    @TableField(value = "min_consume")
    private BigDecimal minConsume;

    /**
     * 开始时间
     */
    @TableField(value = "valid_from")
    private Date validFrom;

    /**
     * 结束时间
     */
    @TableField(value = "valid_to")
    private Date validTo;

    /**
     * 状态(0:未使用,1:已使用,2:已过期)
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}